VtWarningDialog


Create a Warning dialog

Syntax

VtWarningDialog object_name [options]

Description

Creates a Message dialog containing a warning icon. Returns the widget name. The standard dialog options are used to configure the dialog box.

This dialog box appears with the default pushbuttons OK, Cancel and Help. To override the default buttons, -ok, -cancel, and -help can be used to specify which buttons go in the dialog. If any one of these options is used then it is assumed that only buttons which have been individually specified or referenced via either a label or a callback option will be put in the dialog.

If the user chooses either the OK or Cancel button, the dialog is automatically popped down and destroyed. To override this default -autoHide and -autoDestroy options can be used.

Options

-message string (CSG)
Specifies the text of the message. Use \n to separate lines.

Example

This code produces a Warning dialog box with an OK button and a Help button.

set app [VtOpen "Warning Dialog Demo"]

VtWarningDialog $app.warning -message \
        "This is an example \nof VtWarningDialog" \
        -ok \
        -help 

VtShowDialog $app.warning
VtMainLoop

This code produces the following:

See also: